﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Security;
using NUnit.Framework;

namespace Common.Tests.Security
{
    [TestFixture]
    public class CryptoHelperTests
    {
        private const string STR_Secret = "the test secret";
        private const string STR_Password = "the password";

        [Test]
        public void Encrypt_Decrypt_working()
        {
            var target = new CryptoHelper();
            
            var encrypted = target.Encrypt(STR_Secret, STR_Password);
            Assert.AreEqual(STR_Secret, target.Decrypt(encrypted, STR_Password));
        }
    }
}
